home *** CD-ROM | disk | FTP | other *** search
- Path: brighton.openmarket.com!decwrl!purdue!yuma!usenet
- From: shuyuan xuan <xuan@cs.colostate.edu>
- Newsgroups: comp.lang.c
- Subject: memory error, the tough bug for debuging !
- Date: Wed, 17 Apr 1996 17:18:14 -0600
- Organization: Colorado State University, Fort Collins, CO 80523
- Message-ID: <31757C36.4DFA@cs.colostate.edu>
- NNTP-Posting-Host: hummel.cs.colostate.edu
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.01 (X11; I; HP-UX A.09.01 9000/715)
-
- In one program, I used the following function
- multiply_sm(double mat1[][4],double *arr,double *result)
- the third parameter is supposed to be "double result[4]"
-
- but when I called it in the main program, I used
- multiply_sm(m,pt,result);
- my error--- I defined: double result[3]
- although it should be: double result[4]
-
- Resonably there is no problem in compiling,even in running.
- There is no core dump here. But the memory was disrupted,
- therfore, some very strange things happened elsewhere,
- which seemed completely irrelevant.
-
- It took me quite some time to figure this out. This kind of
- memory error is difficult to debug. Is it any better with
- c++ ? Any comment on memory error is appreciated.
-
- Andrew x.
- from colorado
-